<include file="Public:header" />

<div id="page-body">
    <div id="qan-breadcrumbs"><span><a href="{$_global.site_url}">{$Think.lang.home}</a></span>&gt;&nbsp;<span><a href="{$user.user_id|format_user_url=$user['username']}">{$Think.lang.user_activity}</a></span>&gt;&nbsp;<span>{$Think.lang.user_statistics}</span></div>
    <div id="chart-container">
        <div class="hd">
            <select id="type" name="type" style="width:150px;">
                <option value="point">{$Think.lang.point_count}</option>
                <option value="answer">{$Think.lang.answer_count}</option>
                <option value="question">{$Think.lang.question_count}</option>
                <option value="comment">{$Think.lang.comment_count}</option>
            </select>
            <select id="length" name="length" style="width:150px;">
                <option value="week">{$Think.lang.1_week}</option>
                <option value="month">{$Think.lang.1_month}</option>
                <option value="3month">{$Think.lang.3_months}</option>
            </select>
            <input type="button" value="{$Think.lang.go}" onclick="reloadChart({$user.user_id});" />
        </div>
        <div class="bd mod">
            <div id="chart" class="chart">{$chart}</div>
        </div>
    </div>
</div>

<include file="Public:footer" />

<script type="text/javascript">
function reloadChart(uid){
    tmp = findSWF("chart");
    var type = $('#type').val();
    var length = $('#length').val();
    var url = APP +'/User/getStatisticsData/uid/'+uid+'/type/'+type+'/length/'+length;
    x = tmp.reload(url);
}
</script>
